package com.devbobcorn.nekoration.network;

import java.util.function.Supplier;

import com.devbobcorn.nekoration.client.ClientHelper;

import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fml.network.NetworkEvent;

public class S2CStartMusic {
	public S2CStartMusic() { }

	public static void encode(final S2CStartMusic msg, final PacketBuffer packetBuffer) { }

	public static S2CStartMusic decode(final PacketBuffer packetBuffer) {
		return new S2CStartMusic();
	}

	public static void handle(final S2CStartMusic msg, final Supplier<NetworkEvent.Context> contextSupplier) {
        contextSupplier.get().enqueueWork(() -> {
			//Handle this on CLIENT SIDE...
			ClientHelper.startMusic();
        });
        contextSupplier.get().setPacketHandled(true);
	}
}